package com.is.exportword;

import com.is.control.AttendanceTimeControl;
import com.is.control.ParamCourseControl;
import com.is.control.UserControl;
import com.is.model.CourseClass;
import com.is.model.CourseScore;

public class WordBean{
	private CourseClass cc;
	private CourseScore cs;
	public CourseScore getCs() {
		return cs;
	}
	public void setCs(CourseScore cs) {
		this.cs = cs;
	}
	public CourseClass getCc() {
		return cc;
	}
	public void setCc(CourseClass cc) {
		this.cc = cc;
	}
	//课程名
	private String courseName;
	private String courseNameEn;
	//总课时
	private int totalCourse;
	//课程教师
	private String teacherName;
	//学生缺勤数
//	private int totlaQq;
	public String getCourseName() {
		if(cc==null) return "";
		return ParamCourseControl.getCourseById(cc.getCourseId()).getCourseName().replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;");
	}
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	public String getCourseNameEn() {
		if(cc==null) return "";
		return ParamCourseControl.getCourseById(cc.getCourseId()).getCourseNameEn().replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;");
	}
	public void setCourseNameEn(String courseNameEn) {
		this.courseNameEn = courseNameEn;
	}
	public int getTotalCourse() {
		if(cc==null) return 0;
		return AttendanceTimeControl.getCount(cc.getId(),cc.getStuyear(),"","")*2;
	}
	public void setTotalCourse(int totalCourse) {
		this.totalCourse = totalCourse;
	}
	public String getTeacherName() {
		if(cc==null) return "";
		return UserControl.getUserById(cc.getUid()).getName().replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\"", "&quot;");
	}
	public void setTeacherName(String teacherName) {
		this.teacherName = teacherName;
	}
	
}
